 <template>
  <div>
    <aleat>{{n}}秒后跳回登录页</aleat>
  </div>
</template>
 <script>
export default {
  data() {
    return {
        n:3
    };
  },
  methods: {},
  computed: {},
  mounted(){
    var n=3
    setInterval(() => {
       n--
       this.n=n
    }, 1000)
  },
  beforeRouteEnter(to, from, next) {
    next();
      setInterval(() => {
        next("/");
      }, 3000)
  },
};
</script>
 <style lang='css'>
</style>